import base64
with open("logo.gif", "rb") as image_file:
    image_data_base64_encoded_string = base64.b64encode(image_file.read())
write_data = "logo = %s" % image_data_base64_encoded_string
f = open("logo.py","w+")
f.write(write_data)
f.close()
